package util;

import java.io.Serializable;
import java.util.Comparator;

/**
 * Comparator class for sorting by driver ID in ascending order
 * 
 * @author team07
 * 
 */
public class SortByID implements Comparator<Contestant>, Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -3821140800053450608L;

	/**
	 * Returns the int-value for sorting regarding sorting by driver ID in
	 * ascending order
	 * 
	 * @return Negative Int if Contestant c1 has the smallest driver ID and vice
	 *         versa
	 */
	public int compare(Contestant c1, Contestant c2) {
		return c1.getID() - c2.getID();
	}
}